<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>编辑 EPUB</title>
  <link href="../Styles/styles.css" rel="stylesheet" type="text/css"/>
</head>

<body>
  <h2 title="Edit With Find &amp; Replace">使用 查找 &amp; 替换 进行编辑</h2>

  <p>In Sigil, Find &amp; Replace can be used to find any text in any of your files. And even more important, it can be used to change text – but only in Code View.</p>
  <p>在 Sigil 中，“查找 &amp; 替换”可用于查找任何文件中的任何文本。甚至更重要的是，它可用于更改文本——但仅在代码视图中可用。</p>

  <p>To open the Find &amp; Replace, use <span class="menuitem">Search<span class="menuitem">→</span>Find &amp; Replace</span> or its shortcut. The Find &amp; Replace window will open just below your editing window, and will stay there until you close it:</p>
  <p>要打开“查找 &amp; 替换”，请使用 <span class="menuitem">搜索<span class="menuitem">→</span>查找 &amp; 替换</span> 或其快捷方式。“查找 &amp; 替换”窗口将在您的编辑窗口正下方打开，并将一直停留在该窗口中，直到您将其关闭：</p>

  <div class="image">
    <img alt="find-replace-options" src="../Images/find-replace-options.png"/>
  </div>

  <p>There are quite a few option, so if you want to hide some of them you can click on the show/hide chevron on the lower left to hide the Options line (click again to show them again):</p>
  <p>有很多选项，因此，如果要隐藏其中一些，可以单击左下角的显示/隐藏人字形以隐藏“选项”行（再次单击以再次显示它们）：</p>

  <div class="image">
    <img alt="find-replace-basic" src="../Images/find-replace-basic.png"/>
  </div>

  <div class="tip">
    <p class="tiptext">The Find and Replace text boxes are where you enter what to look for and change. The buttons on the right (Find, Replace, Replace/Find, Replace All, and Count All) are used to run your search. The Mode dropdown boxes on the bottom allow you to change what to search for, where to search, and which direction to search in.</p>
    <p class="tiptext">在“查找和替换”文本框中，您可以输入要查找和更改的内容。右侧的按钮（查找，替换，替换/查找，全部替换和全部计数）用于运行搜索。底部的模式下拉框允许您更改搜索内容，搜索位置以及搜索方向。</p>

    <p class="tiptext">Each dropdown and button has a tooltip with more details.</p>
    <p class="tiptext">每个下拉菜单和按钮都有一个工具提示，其中包含更多详细信息。</p>
  </div>

  <h3 class="sigil_not_in_toc">使用 查找 &amp; 替换</h3>

  <p>To make a simple change enter some text to search for in the Find box, and in the Replace box enter the new text to replace it with:</p>
  <p>要进行简单的更改，请在“查找”框中输入一些文本进行搜索，然后在“替换”框中输入新文本以将其替换为：</p>

  <div class="image">
    <img alt="tutorial-find-start" src="../Images/tutorial-find-start.png"/>
  </div>

  <p>Click on <span class="buttonbox">Count All</span> to show how many matches there are for the text in the Find box (Count and Find ignore what is in the Replace box):</p>
  <p>单击 <span class="buttonbox">全部计数</span> 以显示“查找”框中的文本有多少个匹配项（“计数”和“查找”忽略“替换”框中的内容）：</p>

  <div class="image">
    <img alt="tutorial-find-count" src="../Images/tutorial-find-count.png"/>
  </div>

  <p>You’ll notice that you switched to Code View if you weren’t already using it! This is because all major searches are done in Code View. You should stay in Code View for this tutorial.</p>
  <p>您会注意到，如果您尚未使用代码视图，则将其切换为代码视图！这是因为所有主要搜索都在“代码视图”中完成。您应该在本教程的代码视图中停留。</p>

  <p>Note that the number of matches is shown on the bottom right.</p>
  <p>请注意，匹配数显示在右下角。</p>

  <p>Now click on <span class="buttonbox">Find</span>. The next occurrence of the word in the Find box will be highlighted:</p>
  <p>现在点击 <span class="buttonbox">查找</span>。该单词在“查找”框中的下一个出现将突出显示：</p>

  <div class="image">
    <img alt="tutorial-find-the" src="../Images/tutorial-find-the.png"/>
  </div>

  <p>Click on <span class="buttonbox">Replace</span> – this changes the text to what is in the Replace box and leaves the new text highlighted:</p>
  <p>单击 <span class="buttonbox">替换</span>——这会将文本更改为“替换”框中的内容，并使新文本突出显示：</p>

  <div class="image">
    <img alt="tutorial-find-test" src="../Images/tutorial-find-test.png"/>
  </div>

  <p>To make it a little easier to find and replace one occurrence after another, you can use the <span class="buttonbox">Replace/Find</span> button. When you click on this button Sigil will replace the selected text if it matches, and then find and highlight the next match.</p>
  <p>为了使查找和替换一个事件更加容易一些，可以使用 <span class="buttonbox">“替换/查找”</span> 按钮。当您单击此按钮时，Sigil 将替换所选的文本（如果匹配），然后查找并突出显示下一个匹配项。</p>

  <p>If you are satisfied that the Replace is working okay, you can use <span class="buttonbox">Replace All</span> to update all the matching text in your document at once instead of one at a time.</p>
  <p>如果您对“替换”工作正常感到满意，则可以使用 <span class="buttonbox">全部替换</span> 一次更新一次文档中所有匹配的文本，而不必一次更新一次。</p>

  <div class="tip">
    <p class="tiptext">Always use Count All and possibly a few Replace commands before using Replace All – to make sure you have entered your find and replace strings correctly.</p>
    <p class="tiptext">在使用全部替换之前，请始终使用全部计数以及可能的一些替换命令——确保已正确输入查找和替换字符串。</p>
  </div>

  <p>You may have noticed the selection box containing "Current HTML File". If you change "Current HTML File" to "All HTML Files", your Find or Replace will be done across every HTML file in your EPUB:</p>
  <p>您可能已经注意到包含“当前 HTML 文件”的选择框。如果将“当前 HTML 文件”更改为“所有 HTML 文件”，则将对 EPUB 中的每个 HTML 文件进行查找或替换：</p>

  <div class="image">
    <img alt="tutorial-find-all" src="../Images/tutorial-find-all.png"/>
  </div>

  <p>This is why editing in Sigil can be done quickly.</p>
  <p>这就是为什么可以快速完成 Sigil 中的编辑的原因。</p>

  <p>The last main part of Find &amp; Replace is its ability to use Regular Expressions – but see the <a href="../Text/tutorial_advanced_find.html">Advanced Find &amp; Replace</a> chapter for more details.</p>
  <p>查找 &amp; 替换 的最后一个主要部分是它使用正则表达式的能力——有关更多详细信息，请参见 <a href="../Text/tutorial_advanced_find.html">高级 查找 &amp; 替换</a> 一章。</p>
</body>
</html>